from django.urls import path  # 从 django.urls 导入 path
from . import views


app_name = 'user'  # 设置应用命名空间

urlpatterns = [
    path('login/', views.login, name='login'),  # 登录
    path('register/', views.register, name='register'),  # 注册
    path('register_handle/', views.register_handle, name='register_handle'),  # 处理注册
    path('login_handle/', views.login_handle, name='login_handle'),  # 处理登录
    path('logout/', views.logout, name='logout'),  # 登出
    path('user_center/', views.user_center, name='user_center'),  # 用户中心
    path('reset_password/', views.reset_password, name='reset_password'),  # 重置密码
    path('release_records/', views.release_records, name='release_records'),  # 发布记录
    path('purchase_record/', views.purchase_record, name='purchase_record'),  # 购买记录
    path('collection/', views.collection, name='collection'),  # 收藏
    path('browse_history/', views.browse_history, name='browse_history'),  # 浏览历史
    path('c_password/', views.c_password, name='c_password'),  # 更改密码
    path('logon_record/', views.logon_record, name='logon_record'),  # 登录记录
    path('cart/', views.cart, name='cart'),  # 购物车
    path('delete_cart/', views.delete_cart, name='delete_cart'),  # 删除购物车
    path('profile/<int:user_id>/', views.profile, name='profile'), #访问用户主页
    path('selling_goods/', views.selling_goods, name='selling_goods'),
    path('buying_goods/', views.buying_goods, name='buying_goods'),
    path('delete_good/<int:good_id>/', views.delete_good, name='delete_good'),
    path('edit_profile/', views.edit_profile, name='edit_profile'),
]
